package old.resourceCache;

import java.util.zip.ZipEntry;


public class ResHandle {
	
	protected ZipEntry entry;
	protected char[] buffer;
	protected int size;
	protected ResCache resCache;
	
	public ResHandle(ZipEntry entry, char[] buffer, int size, ResCache resCache) {
		
		this.entry = entry;
		this.buffer = buffer;
		this.size = size;
		this.resCache = resCache;		
	}
	
	public int load(IResourceFile file) {
		return file.getResource(entry, buffer);
	}
	
	public int getSize() {
		return size;
	}
	
	public char[] getBuffer() {
		return buffer;
	}
	
	public ZipEntry getResource()
	{
		return entry;
	}
	//Code on p.194 contains destructor for buffer and resCache.  Check if
	//this is necessary.
	
	

}
